package org.example.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.example.pojo.admindto.AdminLoginDTO;
import org.example.pojo.admindto.AdminRegisterDTO;
import org.example.pojo.entity.Admin;

@Mapper
public interface AdminMapper {

    @Insert("insert into admin(adminname, password, email, authorizeid)" +
            " VALUES(#{adminname}, #{password}, #{email}, #{authorizeid})")
    public void authorize(Admin admin);
    @Select("select * from admin where adminname = #{adminname} and password = #{password}")
    public Admin login(AdminLoginDTO adminLoginDTO);
    @Select("select * from admin where adminname = #{adminname}")
    public Admin check(String adminname);

}
